<?php if(!defined('IN_UCHOME')) exit('Access Denied'); ?><?php if(empty($_SGLOBAL['inajax'])) { ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=<?=$_SC['charset']?>" />
<title><?php if($_TPL['titles']) { ?><?php if(is_array($_TPL['titles'])) { foreach($_TPL['titles'] as $value) { ?><?php if($value) { ?><?=$value?> - <?php } ?><?php } } ?><?php } ?><?php if($space) { ?><?=$space['username']?> - <?php } ?><?=$_SCONFIG['sitename']?> - Powered by UCenter Home</title>
<script language="javascript" type="text/javascript" src="source/script_common.js"></script>
<script language="javascript" type="text/javascript" src="source/script_menu.js"></script>
<script language="javascript" type="text/javascript" src="source/script_ajax.js"></script>
<style type="text/css">
@import url(template/<?=$_SC['template']?>/common.css);
<?php if(!empty($space['theme'])) { ?>
@import url(theme/<?=$space['theme']?>/style.css);
<?php } ?>
<?php if(!empty($space['css'])) { ?>
<?=$space['css']?>
<?php } ?>
</style>
<?php if($space['uid']) { ?>
<link rel="alternate" type="application/rss+xml" href="rss.php?uid=<?=$space['uid']?>" title="<?=$space['username']?>" />
<?php } ?>
<link rel="edituri" type="application/rsd+xml" title="rsd" href="xmlrpc.php?rsd=1" />
</head>
<body>
<div id="append_parent"></div>
<div id="ajaxwaitid"></div>
<div id="wrap">
<div id="header">
<h2><a href="index.php"><img src="<?=$_SCONFIG['sitelogo']?>" alt="<?=$_SCONFIG['sitename']?>" /></a></h2>
<?php if($_SGLOBAL['supe_uid']) { ?>
<ul id="menu">
<li><a href="space.php?do=home">首页</a><?php if($space['self'] && $space['credit']<10) { ?><a href="space.php?do=home&view=guide" class="edit">向导</a><?php } ?></li>
<li><a href="space.php">个人主页</a></li>
<li><a href="space.php?do=friend">好友</a><a href="javascript:;" onclick="openSub(this,'friend');" class="drop">&nbsp;</a></li>
<li><a href="network.php">随便看看</a><?php if(empty($_SCONFIG['showall'])) { ?><a href="space.php?do=home&view=all" class="edit">近况</a><?php } ?></li>
<li><a href="space.php?do=pm"><span id="span_newpm">私信</span><?php if(!empty($_SGLOBAL['member']['newpm'])) { ?><script>newpm();</script><?php } ?></a><a href="javascript:;" onclick="openSub(this,'pm');" class="drop">&nbsp;</a></li>
</ul>
<div id="op">
<a href="cp.php">设置</a><span class="pipe">|</span>
<a href="cp.php?ac=privacy">策略</a><span class="pipe">|</span>
<?php if($space['self'] && $space['credit']>=10) { ?><a href="space.php?do=home&view=guide">向导</a><span class="pipe">|</span><?php } ?>
<a href="cp.php?ac=common&op=logout">退出</a>
</div>
<?php } else { ?>
<div id="op">
<a href="index.php">首页</a><span class="pipe">|</span>
<a href="space.php">我的空间</a><span class="pipe">|</span>
<a href="help.php">帮助</a>
</div>
<?php } ?>
</div>
<div id="submenu">
<div id="subfriend" class="submenu">
<ul>
<li><a href="space.php?do=friend">好友列表</a></li>
<li><a href="space.php?do=friend&view=visitor">我的访客</a></li>
<li><a href="space.php?do=friend&view=trace">我的足迹</a></li>
<li><a href="space.php?do=friend&view=online">在线用户</a></li>
<li class="line"><a href="cp.php?ac=friend&op=find">寻找好友</a></li>
<li><a href="cp.php?ac=invite">邀请好友</a></li>
</ul>
</div>
<div id="subpm" class="submenu">
<ul>
<li><a href="space.php?do=pm">查看未读</a></li>
<li><a href="space.php?do=pm&view=inbox">收件箱</a></li>
<li><a href="space.php?do=pm&view=outbox">发件箱</a></li>
<li><a href="space.php?do=notice">通知</a></li>
<li class="line"><a href="cp.php?ac=pm">发送私信</a></li>
</ul>
</div>
</div>
<div id="content" class="s_clear">
<div id="side">
<?php if($_SGLOBAL['supe_uid']) { ?>
<ul id="app" class="app_list">
<li class="app-doing"><a href="space.php?do=doing">迷你博客</a></li>
<li class="app-blog"><a href="space.php?do=blog">日志</a><em><a href="cp.php?ac=blog">发表</a></em></li>
<li class="app-photo"><a href="space.php?do=album">相册</a><em><a href="cp.php?ac=upload">上传</a></em></li>
<li class="app-mtag"><a href="space.php?do=thread">话题</a><em><a href="cp.php?ac=thread">发起</a></em></li>
<li class="app-share"><a href="space.php?do=share">分享</a></li>

<?php if(is_array($_SGLOBAL['app'])) { foreach($_SGLOBAL['app'] as $key => $value) { ?>
<?php if($key != UC_APPID && $value['open']) { ?>
<li class="app-<?=$value['type']?>"><a href="space.php?do=app&appid=<?=$key?>" title="<?=$value['name']?>"><?=$value['name']?></a></li>
<?php } ?>
<?php } } ?>
</ul>
<?php } else { ?>
<?php if(empty($space['theme']) && empty($space['css'])) { ?>
<?php if(empty($_SGLOBAL['nologinform'])) { ?>
<form id="loginform" name="loginform" action="do.php?ac=login&ref" method="post">
<div style="padding: 10px;">
<p class="gray"><label for="username">用户名：</label></p>
<p><input type="text" name="username" id="username" class="t_input" value="<?=$membername?>" size="15" style="width: 100px;" /></p>
<p class="gray"><label for="password">密　码：</label></p>
<p><input type="password" name="password" id="password" class="t_input" size="15" style="width: 100px;" /></p>
<p><input type="checkbox" id="cookietime" name="cookietime" value="315360000" checked /> <label for="cookietime">下次自动登录</label></p>
<p style="padding-top: 4px;">
<input type="hidden" name="refer" value="space.php?do=home" />
<input type="submit" id="loginsubmit" name="loginsubmit" value="登录" class="submit" style="padding: 0; width: 50px;" />
<a href="do.php?ac=lostpasswd">找回密码</a>
</p>
</div>
</form>
<?php } ?>
<ul class="sidelink">
<li><a href="do.php?ac=register"><strong>注册</strong>期待您的入住</a></li>
<li><a href="help.php"><strong>页面介绍</strong>了解一下您的家</a></li>
<?php if($_SCONFIG['networkpublic']) { ?><li><a href="network.php"><strong>随便看看</strong>看看大家在做什么</a></li><?php } ?>
</ul>
<?php } ?>
<?php } ?>

<?php if(empty($space['theme']) && empty($space['css'])) { ?>
<?php adshow('leftside'); ?><!-- 左侧栏广告-->
<?php } ?>
</div>
<div id="mainarea">
<?php } else { ?>
<?php obclean();
	@header("Expires: -1");
	@header("Cache-Control: no-store, private, post-check=0, pre-check=0, max-age=0", FALSE);
	@header("Pragma: no-cache");
	@header("Content-type: application/xml; charset=$_SC[charset]");
	echo '<'."?xml version=\"1.0\" encoding=\"$_SC[charset]\"?>\n";
	echo "<root><![CDATA["; ?>
<?php } ?>

<div class="c_header">
<ul class="tabs">
<li<?=$actives['js']?>><a href="cp.php?ac=upload&albumid=<?=$albumid?>">批量上传</a></li>
<li<?=$actives['flash']?>><a href="cp.php?ac=upload&op=flash&albumid=<?=$albumid?>">多选上传</a></li>
<li<?=$actives['cam']?>><a href="cp.php?ac=upload&op=cam&albumid=<?=$albumid?>">大头帖</a></li>
</ul>
</div>

<div class="h_status"><?php if($maxattachsize) { ?><a href="cp.php?ac=space&op=addsize">空间容量</a> <?=$maxattachsize?>, <?php } ?>已用空间 <?=$space['attachsize']?><span class="pipe">|</span><a href="space.php?uid=<?=$space['uid']?>&do=album&view=me">返回我的相册</a></div>

<div class="d_content">

<?php if(empty($_GET['op'])) { ?>

<div class="c_form">
<table cellspacing="0" cellpadding="0" class="formtable">
<caption>
<h2>选择图片</h2>
<p>从电脑中选择你要上传的图片，可以选择多个图片后进行批量上传</p>
</caption>
<tbody id="attachbodyhidden" style="display:none">
<tr>
<td>
<form method="post" id="upload" action="cp.php?ac=upload" enctype="multipart/form-data" target="uploadframe">
<input type="file" name="attach" size="25" style="border: 1px solid #CCC;" />
<span id="localfile"></span>
<input type="hidden" name="uploadsubmit" id="uploadsubmit" value="true" />
<input type="hidden" name="albumid" id="albumid" value="0" />
</form>
</td>
</tr>
</tbody>
<tbody id="attachbody"></tbody>
</table>
</div>

<script>

no_insert = 1;
function a_addOption() {
var obj = $('uploadalbum');
obj.value = 'addoption';
addOption(obj);
}
function passwordShow(value) {
if(value==4) {
$('span_password').style.display = '';
$('tb_selectgroup').style.display = 'none';
} else if(value==2) {
$('span_password').style.display = 'none';
$('tb_selectgroup').style.display = '';
} else {
$('span_password').style.display = 'none';
$('tb_selectgroup').style.display = 'none';
}
}
function getgroup(gid) {
if(gid) {
var x = new Ajax();
x.get('cp.php?ac=privacy&op=getgroup&gid='+gid, function(s){
$('target_names').innerHTML += s;
});
}
}
function album_op(id) {
$('selectalbum').style.display = 'none';
$('creatalbum').style.display = 'none';
$(id).style.display = '';
}
</script>

<script src="source/script_upload.js" type="text/javascript"></script>
<iframe id="uploadframe" name="uploadframe" width="0" height="0" marginwidth="0" frameborder="0" src="about:blank"></iframe>

<form method="post" id="albumform" action="cp.php?ac=upload" class="c_form" target="uploadframe">
<table cellspacing="0" cellpadding="0" class="formtable">
<caption>
<h2>
<input type="radio" id="albumop_selectalbum" name="albumop" value="selectalbum" checked onclick="album_op(this.value);"> <label for="albumop_selectalbum">添加到现有相册</label> &nbsp;
<input type="radio" id="albumop_creatalbum" name="albumop" value="creatalbum" onclick="album_op(this.value);"> <label for="albumop_creatalbum">新建一个相册</label>
</h2>
</caption>

<tbody id="selectalbum">
<tr><td>
<table width="100%" class="infotable">
<tr>
<th width="60">选择相册</th>
<td>
<select name="albumid" id="uploadalbumid">
<option value="0">默认相册</option>
<?php if(is_array($albums)) { foreach($albums as $value) { ?>
<?php if($value['albumid'] == $_GET['albumid']) { ?>
<option value="<?=$value['albumid']?>" selected><?=$value['albumname']?></option>
<?php } else { ?>
<option value="<?=$value['albumid']?>"><?=$value['albumname']?></option>
<?php } ?>
<?php } } ?>
</select>
</td>
</tr>
</table>
</td>
</tr>
</tbody>

<tbody id="creatalbum" style="display:none;">
<tr><td>
<table width="100%" class="infotable">
<tr>
<th width="60">相册名</th>
<td><input type="text" class="t_input" size="20" id="uploadalbumname" name="albumname" value=""></td>
</tr>
<tr>
<th>隐私设置</th>
<td>
<select name="friend" id="uploadfriend" onchange="passwordShow(this.value);">
<option value="0">全站用户可见</option>
<option value="1">全好友可见</option>
<option value="2">仅指定的好友可见</option>
<option value="3">仅自己可见</option>
<option value="4">凭密码查看</option>
</select>
<span id="span_password" style="display:none;">密码:<input type="text" id="uploadpassword" name="password" value="" size="10"></span>
</td>
</tr>
<tbody id="tb_selectgroup" style="display:none;">
<tr>
<th>指定好友</th>
<td><select name="selectgroup" onchange="getgroup(this.value);">
<option value="">从好友组选择好友</option>
<?php if(is_array($groups)) { foreach($groups as $key => $value) { ?>
<option value="<?=$key?>"><?=$value?></option>
<?php } } ?>
</select> 多次选择会累加到下面的好友名单</td>
</tr>
<tr>
<th>&nbsp;</th>
<td>
<textarea name="target_names" id="target_names" style="width:85%;" rows="3"></textarea>
<br>(可以填写多个好友名，请用空格进行分割)</td>
</tr>
</table>
</td></tr>
</tbody>

<tr>
<td>
<br>
<input type="hidden" name="albumsubmit" id="albumsubmit" value="true" />
<input type="submit" name="uploadsubmit" id="btnupload" value="开始上传" class="submit" />
</td>
</tr>
</table>
</form>

<form method="post" id="albumresultform" action="cp.php?ac=upload" class="c_form">
<input type="hidden" name="opalbumid" id="opalbumid" value="0" />
<input type="hidden" name="viewAlbumid" id="viewAlbumid" value="true" />
</form>

<?php } elseif($_GET['op'] == 'cam') { ?>

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,45,0" width="100%" height="415">
<param name="movie" value="image/cam.swf?site=<?=$siteurl?>&albumid=<?=$_GET['albumid']?>" />
<param name="quality" value="high" />
<embed src="image/cam.swf?site=<?=$siteurl?>&albumid=<?=$_GET['albumid']?>" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="100%" height="415"></embed>
</object>

<?php } else { ?>

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,45,0" width="100%" height="400">
  <param name="movie" value="image/upload.swf?site=<?=$siteurl?>&albumid=<?=$_GET['albumid']?>" />
  <param name="quality" value="high" />
  <embed src="image/upload.swf?site=<?=$siteurl?>&albumid=<?=$_GET['albumid']?>" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="100%" height="400"></embed>
</object>

<?php } ?>

</div>
<div class="f_status f_status_w s_clear">
<a href="javascript:;" onclick="window.scrollTo(0,0);" id="a_top" title="TOP">TOP</a>
</div>
<?php if(empty($_SGLOBAL['inajax'])) { ?>
</div>
</div>

<div id="footer">
<p class="copyright" title="<?php echo debuginfo(); ?>">
<?=$_SCONFIG['sitename']?> &nbsp; <a href="mailto:<?=$_SCONFIG['adminemail']?>">联系我们</a>
<?php if($_SCONFIG['miibeian']) { ?> &nbsp;<a  href="http://www.miibeian.gov.cn" target="_blank"><?=$_SCONFIG['miibeian']?></a><?php } ?>
 &nbsp; Powered by <a  href="http://u.discuz.net" target="_blank">UCenter Home</a> <span title="<?php echo X_RELEASE; ?>"><?php echo X_VER; ?></span>
 <?php if(!empty($_SCONFIG['licensed'])) { ?><a  href="http://license.comsenz.com/?pid=7&host=<?=$_SERVER['HTTP_HOST']?>" target="_blank">Licensed</a><?php } ?>
 &copy; 2001-2008 <a  href="http://www.comsenz.com" target="_blank">Comsenz Inc.</a>
</p>
</div>
</div>
<script language="javascript" type="text/javascript" src="source/script_manage.js"></script>
<?php adshow('footer'); ?><!-- 页脚广告-->

<?php if($_SGLOBAL['supe_uid']) { ?>
<?php if(!isset($_SCOOKIE['checkpm'])) { ?>
<script type="text/javascript" src="cp.php?ac=pm&op=checknewpm&rand=<?php echo rand(0,999) ?>"></script>
<?php } ?>
<?php if(!isset($_SCOOKIE['synfriend'])) { ?>
<script type="text/javascript" src="cp.php?ac=friend&op=syn&rand=<?php echo rand(0,999) ?>"></script>
<?php } ?>
<?php } ?>
</body>
</html>
<?php } ?>
<?php ob_out(); ?><?php subtplcheck('template/default/cp_upload|template/default/header|template/default/footer', '1228307402', 'template/default/cp_upload'); ?>